Returns the full HTML source of a document.
#include <IE.au3>
_IEDocReadHTML ( ByRef $o_object )
Parameters
$o_object | Object variable of an InternetExplorer.Application, Window or Frame object |
Return Value
Success: | Returns the HTML included in the <HTML> of the document, including the <HTML> and </HTML> tags |
Failure: | Returns 0 and sets @ERROR |
@Error: | 0 ($_IEStatus_Success) = No Error |
3 ($_IEStatus_InvalidDataType) = Invalid Data Type | |
@Extended: | Contains invalid parameter number |
Remarks
This function returns the document source after any client-side modifications (e.g. by AutoIt or by client-side JavaScript). It may therefore be different than what is shown by the browser View Source or by _INetGetSource.
Related
_IEDocWriteHTML, _IEBodyReadHTML, _INetGetSource
Example
; *******************************************************
; Example 1 - Open a browser with the basic example, read the document HTML
; (all HTML including the <HEAD> and script) and display it in a MsgBox
; *******************************************************
;
#include <IE.au3>
$oIE = _IE_Example ("basic")
$sHTML = _IEDocReadHTML ($oIE)
MsgBox(0, "Document Source", $sHTML)